<html lang="en-US">

<head>
    
<title>windows开机自启动应用 - 花落雨忧</title>

<meta property="og:title" content="windows开机自启动应用 - 花落雨忧">



    



    
    <meta property="description" content="客户有一款竖行屏，要定向展示某个内容，具体内容是打开谷歌浏览器访问某个链接，并隐藏地址栏全屏展示
[&amp;hellip;] 开启自启动可以通过windows系统自带的功能，但要实现隐藏地址栏并全屏显示则需借助第三方工具AHK
[&amp;hellip;] AHK官网
[&amp;hellip;] 创建hjb.ahk
[&amp;hellip;] #NoEnv ; Recommended for performance and &amp;hellip;">
    <meta property="og:description" content="客户有一款竖行屏，要定向展示某个内容，具体内容是打开谷歌浏览器访问某个链接，并隐藏地址栏全屏展示
[&amp;hellip;] 开启自启动可以通过windows系统自带的功能，但要实现隐藏地址栏并全屏显示则需借助第三方工具AHK
[&amp;hellip;] AHK官网
[&amp;hellip;] 创建hjb.ahk
[&amp;hellip;] #NoEnv ; Recommended for performance and &amp;hellip;">
    






<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1">

<link rel="shortcut icon" href="https://www.lican.asia/logo/logo.png" type="image/x-icon" />



<link rel="stylesheet" href="/css/style.min.css" />

<link rel="stylesheet" href="/css/reset.min.css" />




<script src="https://www.lican.asia/js/highlight.min.js"></script>

<script>
hljs.configure({ ignoreUnescapedHTML: true })
hljs.highlightAll();
</script>


<script src="https://www.lican.asia/js/jquery.min.js"></script>




<link href="https://www.lican.asia/css/hugo-code.min.css" rel="stylesheet" />



    <style>
        .post-content img {
            max-width: 400px;
        }
    </style>
</head>

<body id="period" class="home blog">
    <a class="skip-content" href="#main">Press "Enter" to skip to content</a>
    <div id="overflow-container" class="overflow-container">
        <header class="site-header" id="site-header" role="banner">
    <div class="max-width">
        <div id="title-container" class="title-container">
            <div id="site-title" class="site-title"><a href="/">花落雨忧</a></div>
            <p class="tagline">思所及 力所行 方为真.</p>
        </div>
        
        <div id="menu-primary-container" class="menu-primary-container">
            <div class="icon-container">
            </div>
            <div id="menu-primary" class="menu-container menu-primary" role="navigation">
                <nav class="menu">
                    <ul id="menu-primary-items" class="menu-primary-items">
                        
                        
                        <li id="menu-item-0"
                            class="menu-item menu-item-type-custom menu-item-object-custom ">
                            <a href="/posts" aria-current="page" tabindex="0">首页</a></li>
                        
                        <li id="menu-item-1"
                            class="menu-item menu-item-type-custom menu-item-object-custom ">
                            <a href="/tech/" aria-current="page" tabindex="1">技术文档</a></li>
                        
                        <li id="menu-item-2"
                            class="menu-item menu-item-type-custom menu-item-object-custom ">
                            <a href="/article/" aria-current="page" tabindex="2">文章</a></li>
                        
                        <li id="menu-item-3"
                            class="menu-item menu-item-type-custom menu-item-object-custom ">
                            <a href="/project/" aria-current="page" tabindex="3">项目</a></li>
                        
                        <li id="menu-item-4"
                            class="menu-item menu-item-type-custom menu-item-object-custom ">
                            <a href="/about/" aria-current="page" tabindex="4">关于</a></li>
                        
                    </ul>
                </nav>
            </div>
        </div>
    </div>
</header>

        <div id="primary-container" class="primary-container">
            <div class="max-width">
                <section id="main" class="main" role="main">
                    <div id="loop-container" class="loop-container">
                        <div
                            class="post type-post status-publish format-standard hentry entry">
                            <article>
                                <div class="post-container">
                                    <div class="post-header">
                                        <h2 class="post-title">
                                            <a href="/posts/%E5%BC%80%E6%9C%BA%E8%87%AA%E5%90%AF%E5%8A%A8%E8%AE%BE%E7%BD%AE/">windows开机自启动应用</a>
                                        </h2>
                                        
                                        <div class="post-byline">Published on
                                            <a class="date" href="javascript:;">2024/07/12</a>
                                            
                                            
                                            
                                            
                                            
                                        
                                    </div>
                                    <div class="post-content">
                                        <h3 id="windows开机自启动应用">windows开机自启动应用</h3>
<h4 id="背景">背景</h4>
<p>客户有一款竖行屏，要定向展示某个内容，具体内容是打开谷歌浏览器访问某个链接，并隐藏地址栏全屏展示</p>
<h4 id="分析">分析</h4>
<p>开启自启动可以通过windows系统自带的功能，但要实现隐藏地址栏并全屏显示则需借助第三方工具AHK</p>
<h5 id="step1-下载ahk">Step1: 下载ahk</h5>
<p><a href="https://autohotkey.com/">AHK官网</a></p>
<h5 id="step2-编写ahk脚本">Step2: 编写ahk脚本</h5>
<blockquote>
<p>创建hjb.ahk</p>
</blockquote>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-go" data-lang="go"><span style="display:flex;"><span><span style="color:#960050;background-color:#1e0010">#</span><span style="color:#a6e22e">NoEnv</span>  ; <span style="color:#a6e22e">Recommended</span> <span style="color:#66d9ef">for</span> <span style="color:#a6e22e">performance</span> <span style="color:#a6e22e">and</span> <span style="color:#a6e22e">compatibility</span> <span style="color:#a6e22e">with</span> <span style="color:#a6e22e">future</span> <span style="color:#a6e22e">AutoHotkey</span> <span style="color:#a6e22e">releases</span>.
</span></span><span style="display:flex;"><span>; <span style="color:#960050;background-color:#1e0010">#</span><span style="color:#a6e22e">Warn</span>  ; <span style="color:#a6e22e">Enable</span> <span style="color:#a6e22e">warnings</span> <span style="color:#a6e22e">to</span> <span style="color:#a6e22e">assist</span> <span style="color:#a6e22e">with</span> <span style="color:#a6e22e">detecting</span> <span style="color:#a6e22e">common</span> <span style="color:#a6e22e">errors</span>.
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">SendMode</span> <span style="color:#a6e22e">Input</span>  ; <span style="color:#a6e22e">Recommended</span> <span style="color:#66d9ef">for</span> <span style="color:#a6e22e">new</span> <span style="color:#a6e22e">scripts</span> <span style="color:#a6e22e">due</span> <span style="color:#a6e22e">to</span> <span style="color:#a6e22e">its</span> <span style="color:#a6e22e">superior</span> <span style="color:#a6e22e">speed</span> <span style="color:#a6e22e">and</span> <span style="color:#a6e22e">reliability</span>.
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">SetWorkingDir</span> <span style="color:#f92672">%</span><span style="color:#a6e22e">A_ScriptDir</span><span style="color:#f92672">%</span>  ; <span style="color:#a6e22e">Ensures</span> <span style="color:#a6e22e">a</span> <span style="color:#a6e22e">consistent</span> <span style="color:#a6e22e">starting</span> <span style="color:#a6e22e">directory</span>.
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">Run</span>, <span style="color:#e6db74">&#34;C:\Program Files\Google\Chrome\Application\chrome.exe&#34;</span> <span style="color:#a6e22e">http</span>:<span style="color:#75715e">//117.173.165.135:60080/#/brewing_process?organization_id=1702188317321555&amp;header_device_id=1720583071272198&amp;footer_device_id=1706751284514993 --start-maximized --kiosk
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">WinWaitActive</span>, <span style="color:#a6e22e">ahk_exe</span> <span style="color:#a6e22e">chrome</span>.<span style="color:#a6e22e">exe</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">Send</span>, {<span style="color:#a6e22e">F11</span>}
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">return</span>
</span></span></code></pre></div><blockquote>
<p>注意，在windows电脑上找到浏览器地址，例如我的google浏览器的运行地址是C:\Program Files\Google\Chrome\Application\chrome.exe， 然后空格写上要访问的地址</p>
</blockquote>
<p><img src="https://www.lican.site/images/1720774094310.png" alt="1720774094310"></p>
<p>在安装了AHK软件的情况下，双击hjb.ahk文件，即可全屏打开访问的地址并隐藏地址栏</p>
<h5 id="step3-将hjbahk文件放入开机自启动项中">Step3: 将hjb.ahk文件放入开机自启动项中</h5>
<p>Win+R打开cmd：输入shell:startup 打开开机自启动文件夹</p>
<p><img src="https://www.lican.site/images/1720774262011.png" alt="1720774262011"></p>
<p>将hjb.ahk文件复制到该文件夹中即可</p>
<p><img src="https://www.lican.site/images/1720774311169.png" alt="1720774311169"></p>


                                        
                                        
                                        
                                        
                                    </div>

                                    
                                    
                                    

                                    
                                    <div class="post-meta">
                                        
                                        
                                        
                                        <nav class="further-reading">
                                            
                                            <div class="previous">
                                                <span>&lt;&lt; Prev</span>
                                                <a href="https://www.lican.asia/posts/gitea&#43;drone%E6%90%AD%E5%BB%BA%E9%A1%B9%E7%9B%AE%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2/"
                                                    rel="prev">gitea&#43;drone配置自动化部署</a> </div>
                                            
                                            
                                            <div class="next">
                                                <span>Next >></span>
                                                <a href="https://www.lican.asia/tech/golang%E7%9A%84excelize%E4%BD%BF%E7%94%A8%E5%BF%83%E5%BE%97/">golang中使用excelize导出表格</a> 
                                            </div>
                                            
                                        </nav>
                                    </div>
                                    
                                    

                                    
                                    
                                    

                                </div>
                            </article>
                        </div>
                    </div>
                </section>
                <aside class="sidebar sidebar-primary" id="sidebar-primary" role="complementary">
    <h1 class="screen-reader-text">Sidebar</h1>
    

    
    
    <section id="text-2" class="widget widget_text">
        <div class="textwidget">
            
            <div id="profile">
                <div id="profile_picture"><img src="https://www.lican.asia/logo/logo.png"></div>
                <div id="profile_intro">
                    <p><span class="name">Lican</span></p>
                    <p class="intro">全栈开发者，爱好造轮子。</p>
                </div>
            </div>
            
            <p>
                <script type="text/javascript">
                    (function ($) {
                        $(document).ready(function () {
                            var menuPrimaryContainer = $('#menu-primary-container');
                            var profile = $('#text-2');
                            $('#toggle-navigation').click(function () {
                                if (menuPrimaryContainer.hasClass('open')) {
                                    profile.removeClass('open');
                                } else {
                                    profile.addClass('open');
                                }
                            });
                        });
                    })(jQuery);
                </script>
            </p>
        </div>
    </section>
    
    
    
    
    
    <section id="text-5" class="widget widget_text">
        <h2 class="widget-title">开源项目</h2>
        <div class="textwidget">
            <div id="projects" style="line-height: 22px;">
                
                <a href="https://github.com/idoubi/gonews"
                    target="_blank">gonews</a>: &nbsp;Daily news for golang<br>
                
                <a href="https://github.com/idoubi/sql2struct"
                    target="_blank">sql2struct</a>: &nbsp;Generate go struct according to SQL<br>
                
                <a href="https://github.com/idoubi/goz"
                    target="_blank">goz</a>: &nbsp;Request library used in golang<br>
                
        </div>
    </section>
    
    

    
    
    
    
    <section id="qrcode" class="widget widget_media_image">
        <h2 class="widget-title">微信公众号</h2>
        <img width="258" height="258"
            src="https://www.lican.asia/wechat/lican.png"
            class="image wp-image-5514  attachment-full size-full" alt=""
            style="max-width: 100%; height: auto;"
            sizes="(max-width: 258px) 100vw, 258px">
    </section>
    
    

    
    
    

    
    
    

    
    
    
    
</aside>
            </div>
        </div>

        <footer id="site-footer" class="site-footer" role="contentinfo">
    <div class="max-width">
    </div>
    <div class="footer">
        <div id="footercontent">
            © lican.asia All rights reserved<br/>
            Built with Hugo Theme <a href="https://github.com/idoubi/hugo-theme-period" target="_blank">Period</a>
        </div>
    </div>
</footer>

<script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?e8351b6d4626d5881d439ea1f6184baa";
      var s = document.getElementsByTagName("script")[0]; 
      s.parentNode.insertBefore(hm, s);
    })();
</script>
    
    
    </div>
    
</body>

</html>